package com.xiaogang.minio.config;

import cn.hutool.cache.CacheUtil;
import cn.hutool.cache.impl.TimedCache;
import cn.hutool.core.date.DateUnit;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ProjectName : minio
 * @作者 : 侯小刚
 * @描述 :
 * @创建日期 : 2023/10/3 22:14
 */
@Configuration
public class MyCache {

    @Bean(name = "myCacheManager")
    public TimedCache myCacheManager() {
        TimedCache<String, String> timedCache = CacheUtil.newTimedCache(DateUnit.SECOND.getMillis() * 60);
        return timedCache;
    }

}
